/*
 * GetIdMaxMapFAction.java
 * Copyright (c) 2006, FMap
 *
 * Created on 14 de febrero de 2006, 21:21
 */

package fmap.actions.mapF;

import fmap.model.MapF;

/**
 * Obtiene el id maximo de los mapas de ficheros de una coleccion
 *
 * @author  Javier Sanroman Araujo
 * @version $Revision: 1.1
 */
public class GetIdMaxMapFAction
{
   public GetIdMaxMapFAction ()
   {
   }
    
    public int GetIdMaxMapFAction ( int idCollection )
    {
        int id = 0;
        
        MapF[] vMapF = new fmap.actions.collection.GetMapFCollecionAction().GetMapFCollecionAction ( idCollection );

        
        if( vMapF.length > 0 )
        {
            for( int i=0; i<vMapF.length; i++ )
            {
                if( vMapF[i].getIdMapF () > id ) id = vMapF[i].getIdMapF ();
            }
        }
        else
        {
            id = 0;
        }
        
        return id;
    }
    
}
